const axios = require('axios')

const request = axios.create({
  baseURL: 'https://api.github.com',
  timeout: 10000
})

request.interceptors.response.use(res => {
  return res.data
}, err => {
  return Promise.reject(err)
})

module.exports = request
